<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //数组
        //数组下标，数组元素，数组长度
            //0 1 2 3 4 5
            //length 6
        var arr1 = [1,2,3,4,5,6];
        var arr2 = ['1','2',3,4]   
        
        console.log(arr1);
        console.log(arr2);

        console.log(arr1[3]); //-->4
        console.log(arr2[1]); //-->2

        //修改数组元素
        arr1[0] = '100' ;
        console.log(arr1);


        //关联数组！-->没有length
        //特点-->没有下标和length
        //85,60,78 数学 语文 英语
        var ym = [];

        ym['math'] = 85;
        ym['chinese']=60;
        ym['english']=78;

        console.log(ym);

        var arr3 = new Array(1,2,3);

        console.log(arr3);

    </script>
</body>
</html>